# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=soapyhackrf
pkgver=0.3.4
_pkgname=SoapyHackRF
_gitver=soapy-hackrf-$pkgver
pkgrel=1
pkgdesc='Soapy SDR plugin for the HackRF'
arch=('loong64' 'x86_64')
url='https://github.com/pothosware/SoapyHackRF'
license=('GPL3')
depends=('soapysdr' 'hackrf')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$_gitver.tar.gz")
sha512sums=('950fc0d2d9b1a5946605d0f7f934a3d92facb6878251e8d9a673384db85e1b776ab27fd3499db11d482d599f78e705b9394b5e1238935d297252ab5acc8fb935')

build() {
  mkdir -p $_pkgname-$_gitver/build
  cd $_pkgname-$_gitver/build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release

  make
}

package() {
  cd $_pkgname-$_gitver/build

  make DESTDIR="$pkgdir" install
}

